package core.profile.model;

import java.io.Serializable;


import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;


@Entity
@Table(name="basiccredential")
public class BasicCredential implements Serializable {

		private static final long serialVersionUID = -8767337896773261247L;
		private Long uuid;
		private String userId ;
		private String password ;
		private int disabledflag;
		private String passwordreminder;
		private String reminderemail;
		private SecurityQuestion securityquestion;
		private int failurecount;
		private BasicProfile basicprofile ;

		
		@Id
		@GeneratedValue
		@Column(name="uuid")
		public Long getUuid()
		{
			return uuid ;
		}
		@OneToOne(cascade = CascadeType.ALL)
		public BasicProfile getBasicprofile() {
			return basicprofile;
		}
		public void setBasicprofile(BasicProfile basicprofile) {
			this.basicprofile = basicprofile;
		}
		@Column(name="userid" , unique = true)
		public String getUserId() 
		{
			return userId;
		}
		@Column(name="password")
		public String getPassword() 
		{
			return password;
		}
		 
		public void setUuid(Long uuid)
		{
			this.uuid = uuid;
		}
		public void setPassword(String password)
		{
			this.password = password ;
		}
		public void setUserId(String userId)
		{
			this.userId = userId ;
		}
		@Column
		public int getDisabledflag() 
		{
			return disabledflag;
		}
		public void setDisabledflag(int disabledflag) 
		{
			this.disabledflag = disabledflag;
		}
		@Column
		public String getPasswordreminder()
		{
			return passwordreminder;
		}
		public void setPasswordreminder(String passwordreminder) 
		{
			this.passwordreminder = passwordreminder;
		}
		@Column
		public String getReminderemail()
		{
			return reminderemail;
		}
		public void setReminderemail(String reminderemail)
		{
			this.reminderemail = reminderemail;
		}
		@OneToOne(cascade = CascadeType.ALL)
		public SecurityQuestion getSecurityquestion()
		{
			return securityquestion;
		}
		public void setSecurityquestion(SecurityQuestion securityquestion) 
		{
			this.securityquestion = securityquestion;
		}
		@Column
		public int getFailurecount()
		{
			return failurecount;
		}
		public void setFailurecount(int failurecount) 
		{
			this.failurecount = failurecount;
		}
}
